/*
  Remove all duplicate elements from a sorted linked list
  Node is defined as 
  struct Node
  {
     int data;
     struct Node *next;
  }
*/
Node* RemoveDuplicates(Node *head)
{
    // This is a "method-only" submission.
    // You only need to complete this method.
    Node *cn = head, *nn = cn->next;
    while(cn != NULL) {
        while(nn != NULL && nn->data == cn->data)
            nn = nn->next;
        cn->next = nn;
        cn = nn;
    }
    return head;
}